<%--
	author:chengd
	time:2012/10/15 21:39:27
--%>



<%@page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib uri="TowkerTagLib" prefix="rbac"%>
<%@ taglib uri="/WEB-INF/tags/CommonFunction.tld" prefix="cfn" %>
<%@include file="/commons/include/html_doctype.html"%>
<html>
<head>
	<title>添加</title>
	<%@include file="/commons/include/add.jsp" %>
	<script type="text/javascript">
$(function(){
	
	jQuery("#dataForm").validate(
	{
		rules: {
		},
		messages: {
		},
		submitHandler:function(form)
		{
			jQuery.ajax({
				url : ctx + '/manage/basicData/checkExistsPersonCode.htm',
				type : "POST",
				data : {id:0,person_code:$('#person_code').val()},
				dataType : "json",
				success : function(d) {
				if(!d.result)
					jQuery(form).ajaxSubmit(_options);
				else
					alert('人员代码有重复!');
				},error:function(){
				   alert('后台验证人员代码出错');
				}
			});
		}
	});
});
_callback = function() {
	location.href = ctx + "/manage/basicData/getPerson.htm";
}
validCallBack = function()
{
	//添加页面自定义校验

	return true;
};
	</script>
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" class="listLogo">
	<tr>
		<td class="title">人员添加</td>
		<td>
			<div class="menuTool">
				<a class="save" id="dataFormSave" href="#">保存</a>
				<a class="back" href="getPerson.htm">返回</a>
			</div>
		</td>
	</tr>
</table>
<div class="line"></div>
<form id="dataForm" method="post" action="addPerson2.htm">
<table border="0" cellspacing="1" cellpadding="0" class="listTable">
	<tr>
		<td class="form_title">人员代码：</td>
		<td class="form_input"><input type="text" id="person_code" name="person_code" value="" /></td>
		<td class="form_title">人员名称：</td>
		<td class="form_input"><input type="text" id="person_name" name="person_name" value="" /></td>
		<td class="form_title"></td>
		<td class="form_input"></td>
	</tr>
</table>
</form>
</body>
</html>
